﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Learn_try
{
    class Program
    {
        static void Main(string[] args)
        {
            int x = int.MaxValue;
            Console.WriteLine(x);
            try
			{				
                x = checked(x + 1);
			}
			catch (OverflowException ex)
			{
                Console.WriteLine(ex);
			}
			finally
			{
                Console.WriteLine(x);
			}
        }
    }
}
